package com.aaa.rent.service.impl;

import com.aaa.entity.CarComment;
import com.aaa.entity.MainShop;
import com.aaa.entity.Shop;
import com.aaa.rent.dao.CommentDao;
import com.aaa.rent.dao.ShopDao;
import com.aaa.rent.service.CommentService;
import com.aaa.rent.service.ShopService;
import com.aaa.vo.CarCommentVo;
import com.aaa.vo.Result;
import com.aaa.vo.ShopVo;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 荆豪峰
 * @version 1.0
 * #Date: 2023/3/1 20:00
 */
@Service
public class CommentServiceImpl extends ServiceImpl<CommentDao, CarComment> implements CommentService {
    @Autowired
    private CommentDao commentDao;
    @Override
    public Result list(Integer currentPage, Integer pageSize, CarCommentVo carCommentVo) {
        PageHelper.startPage(currentPage, pageSize);
        List<CarCommentVo> sysDictTypes = commentDao.selectListName(carCommentVo.getUsername());
        PageInfo<CarCommentVo> sysDictTypePageInfo = new PageInfo<>(sysDictTypes);
        return new Result(2000,"成功",sysDictTypePageInfo);
    }
}
